<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDistributionRuleTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('distribution_rule', function (Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->integer('highest_level')->default(0)->comment('最高分销等级');
            $table->decimal('first_ratio')->default(0)->comment('一级分销提成比率');
            $table->decimal('secondary_ratio')->default(0)->comment('二级分销提成比率');
            $table->decimal('three_ratio')->default(0)->comment('三级分销提成比率');
            $table->decimal('minimal_withdraw_limit')->default(0)->comment('最低提现金额');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
